<template>
    <div>
      <map-gd></map-gd>
      <new-see :list="loveList"></new-see>
    </div>
</template>

<script>
import NewSee from './components/news'
import MapGd from './components/map'
import axios from 'axios'
export default {
  components: {
    NewSee,
    MapGd
  },
  name: 'Love',
  data () {
    return {
      loveList: []
    }
  },
  methods: {
    getLoveInfo () {
      axios.get('http://huang.ngrok.xiaomiqiu.cn/api/love.json')
        .then(this.getLoveInfoSucc)
    },
    getLoveInfoSucc (res) {
      res = res.data
      if (res.ret && res.data) {
        const data = res.data
        this.loveList = data.loveList
      }
    }
  },
  mounted () {
    this.getLoveInfo()
  },
  activated () {
    this.getLoveInfo()
  }
}
</script>

<style scoped>

</style>
